/**
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 *
 * @Title: Ttt.java
 * @Package com.itttq.tools.mybatis.to
 * @author: 迷蝶
 * @date: 2017年7月15日 下午5:21:03
 * @version V1.0.0
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved.
 */
package com.itttq.tools.mybatis.to;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: BaseGeneratorTo
 * @author: 迷蝶
 * @date: 2017年7月15日 下午5:21:03
 * @Description: 基础生成器对象
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved.
 */

public class GeneratorTo implements Comparable<GeneratorTo>, Serializable {
    private static final long serialVersionUID = -2105185147301661373L;

    // 别名，PO类首字母小写
    private String alias;
    /**
     * 类名称，首字母大小。
     */
    private String aliasCapFirst;
    // 表名
    private String tableName;
    // 表注释
    private String remark;
    // 当前时间
    @SuppressWarnings("unused")
    private Date currentTime;
    // ID字段，这里写死为：${id}
    private String idField;
    // 字段集合
    private List<FieldTo> fields;

    /*** 下面为PO相关配置 **/
    // java po类名称
    private String poName;
    // po包名
    private String poPkg;
    private String qoName;
    private String qoPkg;
    private String toPkg;
    // PO序列化数值
    private String poSerialVersionUID;
    // 额外引入的jar包
    private List<String> poImportPkgs;

    /*** 下面为SERVICE相关配置 **/
    // java service类名称
    private String serviceName;
    // Service包名
    private String servicePkg;

    /*** 下面为MAPPER相关配置 **/
    // mapper包名
    private String mapperPkg;
    // java mapper类名称
    private String mapperName;

    /*** 下面为CONTROLLER相关配置 **/
    // controller包名
    private String controllerPkg;
    // java controller类名称
    private String controllerName;
    // java controller类名称
    private String controllerSerialVersionUID;

    public String getAliasCapFirst() {
        return aliasCapFirst;
    }

    public void setAliasCapFirst(String aliasCapFirst) {
        this.aliasCapFirst = aliasCapFirst;
    }

    public String getToPkg() {
        return toPkg;
    }

    public void setToPkg(String toPkg) {
        this.toPkg = toPkg;
    }

    public void setControllerPkg(String controllerPkg) {
        this.controllerPkg = controllerPkg;
    }

    public String getControllerPkg() {
        return controllerPkg;
    }

    public String getControllerName() {
        return controllerName;
    }

    public void setControllerName(String controllerName) {
        this.controllerName = controllerName;
    }

    public String getPoName() {
        return poName;
    }

    public void setPoName(String poName) {
        this.poName = poName;
    }

    public String getPoPkg() {
        return poPkg;
    }

    public String getQoPkg() {
        return qoPkg;
    }

    public void setQoPkg(String qoPkg) {
        this.qoPkg = qoPkg;
    }

    public String getQoName() {
        return qoName;
    }

    public void setQoName(String qoName) {
        this.qoName = qoName;
    }

    public void setPoPkg(String poPkg) {
        this.poPkg = poPkg;
    }

    public String getControllerSerialVersionUID() {
        return controllerSerialVersionUID;
    }

    public void setControllerSerialVersionUID(String controllerSerialVersionUID) {
        this.controllerSerialVersionUID = controllerSerialVersionUID;
    }

    public String getPoSerialVersionUID() {
        return poSerialVersionUID;
    }

    public void setPoSerialVersionUID(String poSerialVersionUID) {
        this.poSerialVersionUID = poSerialVersionUID;
    }

    public List<String> getPoImportPkgs() {
        return poImportPkgs;
    }

    public void setPoImportPkgs(List<String> poImportPkgs) {
        this.poImportPkgs = poImportPkgs;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getServicePkg() {
        return servicePkg;
    }

    public void setServicePkg(String servicePkg) {
        this.servicePkg = servicePkg;
    }

    public String getMapperPkg() {
        return mapperPkg;
    }

    public void setMapperPkg(String mapperPkg) {
        this.mapperPkg = mapperPkg;
    }

    public String getMapperName() {
        return mapperName;
    }

    public void setMapperName(String mapperName) {
        this.mapperName = mapperName;
    }

    public void setCurrentTime(Date currentTime) {
        this.currentTime = currentTime;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Date getCurrentTime() {
        return new Date();
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIdField() {
        return idField;
    }

    public void setIdField(String idField) {
        this.idField = idField;
    }

    public List<FieldTo> getFields() {
        return fields;
    }

    public void setFields(List<FieldTo> fields) {
        this.fields = fields;
    }

    public int compareTo(GeneratorTo other) {
        if (other == null) {
            return 1;
        }
        return this.getPoName().compareTo(other.getPoName());
    }
}
